﻿<Window x:Class="MainApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        AllowsTransparency="True" WindowStyle="None" Background="Transparent" ResizeMode="NoResize"
        xmlns:fullSync="clr-namespace:FullSync;assembly=FullSync"
        Title="MainWindow" Height="400" Width="625"  WindowStartupLocation="CenterScreen"  >
  <Border CornerRadius="6" BorderThickness="1,0,1,1" >
    <Border.Background>
      <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
        <GradientStop Color="#FF141C29" Offset="0" />
        <GradientStop Color="#FF08111D" Offset="1" />
        <GradientStop Color="#FF202935" Offset="0.45" />
        <GradientStop Color="#FF050E1C" Offset="0.455" />
      </LinearGradientBrush>
    </Border.Background>
    <Border.BorderBrush>
      <LinearGradientBrush EndPoint="0,0" StartPoint="1,1">
        <GradientStop Color="#FF6C6CFF" Offset="1" />
        <GradientStop Color="#FF2C2CE5" Offset="0" />
        <GradientStop Color="#FEB9B9D1" Offset="0.157" />
        <GradientStop Color="#FED6D6E5" Offset="0.831" />
      </LinearGradientBrush>
    </Border.BorderBrush>
    <Grid x:Name="main">
      <Grid.RowDefinitions>
        <RowDefinition Height="40" />
        <RowDefinition Height="*" />
      </Grid.RowDefinitions>

      <Grid Grid.Row="0">
        <Rectangle RadiusX="6" StrokeThickness="1" Stroke="#AA0F5094">
          <Rectangle.Fill>
            <RadialGradientBrush GradientOrigin="0.2,0.3" RadiusX=".6" RadiusY=".6">
              <GradientStop Color="#AAF5FAFF" Offset="0" />
              <GradientStop Color="#AA0F5094" Offset="1" />
            </RadialGradientBrush>
          </Rectangle.Fill>
        </Rectangle>
        <TextBlock Text="Sync To Anywhere"  FontWeight="Bold" VerticalAlignment="Center"  Foreground="White"  HorizontalAlignment="Center" FontSize="13"/>
        <Button HorizontalAlignment="Right"  VerticalAlignment="Center" Margin="0,0,10,0" Content="X" x:Name="btnTest"  Command="Close"   />
      </Grid>

      <Grid Grid.Row="1">
        <Grid.RowDefinitions>
          <RowDefinition Height="*" />
          <RowDefinition Height="25"  x:Name="lastRow"/>
        </Grid.RowDefinitions>
        <Rectangle Grid.Row="1" Grid.RowSpan="2" Fill="#AA0E1421"  RadiusX="4" />
        <Border Grid.Row="0" x:Name="bContent">
          <fullSync:FullSyncContent />
        </Border>
        <Grid Grid.Row="1" Background="#22FFFFFF" Margin="5,0">
          <Grid.RowDefinitions>
            <RowDefinition  Height="25"/>
            <RowDefinition  Height="*"/>
            <RowDefinition   Height="30"/>
          </Grid.RowDefinitions>
          <TextBlock Text="Advance sync mode as follow:"  FontSize="12" VerticalAlignment="Center" Margin="5,0" Foreground="White"/>
          <Button Content="↓"  Visibility="Collapsed" HorizontalAlignment="Right" x:Name="btnDown"/>
          <Button Content="↑"  HorizontalAlignment="Right" x:Name="btnUp"/>
          <ListBox  HorizontalAlignment="Stretch"  Grid.Row="1"
                       VerticalAlignment="Top" Margin="5,5,5,0"  Name="lbTypes"  ItemsSource="{Binding Plugins}">
            <ItemsControl.Template>
              <ControlTemplate TargetType="ItemsControl">
                <StackPanel  Orientation="Horizontal" IsItemsHost="True" />
              </ControlTemplate>
            </ItemsControl.Template>
            <ItemsControl.ItemsPanel>
              <ItemsPanelTemplate>
                <StackPanel Orientation="Horizontal"  IsItemsHost="True"/>
              </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
              <DataTemplate>
                <RadioButton   Foreground="White" Margin="5,0,5,2" Padding="3,0,3,0"  Background="Transparent"
                              IsChecked="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}"
                               Content="{Binding Title}" ToolTip="{Binding Tooltip}" />
              </DataTemplate>
            </ItemsControl.ItemTemplate>
            <ListBox.ItemContainerStyle>
              <Style TargetType="ListBoxItem">
                <!-- Don't focus the list box item, we focus the button inside -->
                <Setter Property="Focusable" Value="False"/>
                <Setter Property="OverridesDefaultStyle" Value="True"/>
                <Setter Property="HorizontalContentAlignment" Value="Left"/>
                <Setter Property="VerticalContentAlignment" Value="Center"/>
                <Setter Property="Template">
                  <Setter.Value>
                    <!-- use only a content presenter, we don't want any decoration around the items -->
                    <ControlTemplate TargetType="ListBoxItem">
                      <ContentPresenter />
                    </ControlTemplate>
                  </Setter.Value>
                </Setter>
              </Style>
            </ListBox.ItemContainerStyle>
          </ListBox>
          <Button Grid.Row="2" HorizontalAlignment="Left" Width="75" Height="20" VerticalAlignment="Top" Margin="10,0,10,10" Content="Go" />
        </Grid>
      </Grid>
    </Grid>
  </Border>

</Window>
